// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package interceptor

import (
	"errors"
	"net/http"
)

const KUBEFLOW_USERID = "Kubeflow-Userid"

type MockHttpInterceptorInterface struct {
}

func (h *MockHttpInterceptorInterface) GetUserNotebookId(userID string) ([]string, error) {
	if userID == "exist_user_id" {
		return []string{"exist_ID"}, nil
	}
	return []string{}, errors.New("userID不存在")
}

func (h *MockHttpInterceptorInterface) doReqCookie(url string, cookie string) (*http.Response, error) {
	header := http.Header{}
	header.Add(KUBEFLOW_USERID, "exist_user_id@sangfor.com")
	response := http.Response{
		Header: header,
	}
	return &response, nil
}
